#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

class A
{
public:
    void display();
    template <typename T>
    void print(T t);
};

void A::display()
{
    cout << "A::display()" << endl;
}

template <typename T>
void A::print(T t)
{
    cout << "A::print(): " << sizeof(T) << endl;
}

template <class T>
class B
{
public:
    void display();
    template <typename X>
    void print(X x);
};

template <class T>
void B<T>::display()
{
    cout << "void B<T>::display(): " << sizeof(T) << endl;
}

template <class T>
template <typename X>
void B<T>::print(X x)
{
    cout << "void B<T>::print(): " << sizeof(T)
        << "," << sizeof(X) << endl;
}

int main()
{
    A a;
    a.display();
    a.print(string("hello"));

    B<int> b;
    b.display();
    b.print(string("hello"));

    return 0;
}

